home *** CD-ROM | disk | FTP | other *** search
- #ifndef __ORIDEFINES__
- #define __ORIDEFINES__
- #include <Types.h>
- #include <memory.h>
- #include <Packages.h>
- #include <Errors.h>
- #include <quickdraw.h>
- #include <fonts.h>
- #include <dialogs.h>
- #include <windows.h>
- #include <menus.h>
- #include <events.h>
- #include <OSEvents.h>
- #include <Desk.h>
- #include <diskinit.h>
- #include <OSUtils.h>
- #include <resources.h>
- #include <toolutils.h>
- #include <AppleEvents.h>
- #include <EPPC.h>
- #include <GestaltEqu.h>
- #include <PPCToolbox.h>
- #include <Processes.h>
- #include <Balloons.h>
- #include <aliases.h>
- #include <lists.h>
- #include <Scrap.h>
- #include "common.h"
- /* make some typedefs so I have some prototype checking */
- typedef void (*myWProcPtr)(WindowPtr theWindow);
- typedef void (*myWActiveProcPtr)(WindowPtr theWindow,Boolean activate);
-
- /* windowControl is the structure attached to every window I create (in the refCon */
- /* field) that contains all the information I need to know about the window. */
- /* data, procedure pointers for controlling, and anything else gets put in this */
- /* struct. That makes my windows autonomous */
- struct windowControl {
- unsigned long windowID; /* master ID number */
- myWProcPtr drawMe; /* content drawing procedure pointer */
- myWProcPtr clickMe; /* content click routine */
- myWProcPtr closeMe; /* document close procedure pointer */
- myWProcPtr sizeMe; /* size procedure */
- myWActiveProcPtr activateMe;
- AliasHandle fileAliasHandle; /* alias for this document */
- Boolean windowDirty;
- Handle generalData; /* cast to whatever you need as you need it */
- };
- typedef struct windowControl windowControl, *windowCPtr, **windowCHandle;
-
- typedef struct documentExtraData{
- ListHandle displayList;
- }documentExtraData;
- typedef documentExtraData **documentExtraDataHdl;
-
-
- enum {kDocWindowResID = 128,kMyDocumentWindow = 1000};
- /* menu enums */
- enum {kMBarID = 128};
- enum {kAppleMenu = 128,kFileMenu,kEditMenu,kToolsMenu};
-
- /* file menu enums */
- enum {kAboutItem=1,kNewItem = 1,kOpenItem,kCloseItem,kSaveItem,kSaveAsItem,kFileBlank1,kPageSetupItem,kPrintItem,kFileBlank2,kQuitItem};
- enum{kGetResInfoItem = 1};
-
- /* general purpose enums */
- enum {kResumeMask=1,kHelpString=128,};
-
- enum {kMinHeight = 200};
-
- enum {kGeneralStrings = 128};
- enum {kSayID=1,kSaySize,kSayType,kSayName,kBigAEWords,kBigListWords};
-
- #define kWaitForItError 8080
-
- /* Dialog resIDs, 200 + */
- enum {kSearchDialog = 200,kSampHelp,kResTypeDialog};
- enum {kResTypeEditLine=4,kResTypeQuitCheck};
-
- /* Alert resIDs 128 + */
- enum {kAboutBox=128,kCouldntFindProc=129,kBadSystem=130,kMDeamonError = 131};
-
- enum {
- kEnterKey = 0x03,
- kTabKey = 9,
- kReturnKey = 0x0D,
- kBackSpace = 8,
- kEscKey = 0x1B,
- kLeftArrow = 0x1C,
- kRightArrow,
- kUpArrow,
- kDownArrow,
- kDeleteKey = 0x7F
- };
-
-
- enum {kFrontSleep = 20,kBackSleep = -1,kScrollBarFudge = 16,kTopLineHeight = 25,kWindowBarPad = 120,
- kIndentDown = 20,kIndent = 5};
-
- typedef pascal Boolean (*extraDialogFilter)(DialogPtr theDialog, EventRecord *theEvent, short *itemHit);
-
- #include "OtherResInfo.protos.h"
-
- #endif /* included... */